package com.huawei.userservice.exception;

import com.huawei.common.pojo.Result;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class GlobalException {

    @ExceptionHandler(Exception.class)
    public Result handleException(Exception e){
        e.printStackTrace();
        //return Result.error(StringUtils.hasLength(e.getMessage()) ? e.getMessage() : "操作异常");
        return Result.error("操作异常");
    }

}
